#pragma once

#include "Config.h"
#include <allegro.h>
#include <vector>
#include <algorithm>
#include "Sprite.h"
#include "MotionBlurredSprite.h"
#include "MaskedBlurredSprite.h"

class Render2D
{
	BITMAP *buffer;

	const unsigned int WIDTH;
	const unsigned int HEIGHT;

	unsigned int max_depth;
	unsigned int page_num;
	BITMAP * page[2];
	BITMAP * currentPage;

public:
	Render2D(void);
	~Render2D(void);
	void init();
	void drawFrame();
	void drawText(char *t, unsigned int x, unsigned int y, FONT *f);
	Sprite ** addSprite(Sprite *s, unsigned int depth);

	std::vector < std::vector <Sprite *> > sprites;
};
